package drds.server.net.packet;

/**
 * 
 * @author 曹正辉<330937205@qq.com>
 * 
 */
public class Statement {

	private long id;
	private String sql;
	private int columnsNumber;
	private int parametersNumber;
	private int[] parameterTypes;

	/**
	 * 存放COM_STMT_SEND_LONG_DATA命令发送过来的字节数据
	 * 
	 * <pre>
	 * key : param_id
	 * value : byte data
	 * </pre>
	 */

	public Statement(long id, String sql, int columnsNumber, int parametersNumber) {
		this.id = id;
		this.sql = sql;
		this.columnsNumber = columnsNumber;
		this.parametersNumber = parametersNumber;
		this.parameterTypes = new int[parametersNumber];
	}

	public long getId() {
		return id;
	}

	public String getStatement() {
		return sql;
	}

	public int getColumnsNumber() {
		return columnsNumber;
	}

	public int getParametersNumber() {
		return parametersNumber;
	}

	public int[] getParametersType() {
		return parameterTypes;
	}

}